MODULE_NAME = test_io
KERNEL_DIR := /lib/modules/$(shell uname -r)/build/

obj-m := $(MODULE_NAME).o
PWD := $(shell pwd)

all:
	$(MAKE) modules -C $(KERNEL_DIR) M=$(PWD)
build:
	$(MAKE) modules -C $(KERNEL_DIR) M=$(PWD)
clean:
	$(MAKE) -C $(KERNEL_DIR) M=$(PWD) clean
insmod:
	insmod $(MODULE_NAME).ko
rmmod:
	rmmod $(MODULE_NAME)
